// 订单路由
const order = require('express').Router();

// 添加订单
order.post('/', require('./action/order/create')); 
// 查询所有订单信息
order.get('/', require('./action/order/find'));
// 根据订单号查询订单信息
order.get('/order_number', require('./action/order/findOrderNumber'));
// 根据订单id查询订单信息
order.get('/:id', require('./action/order/findById'));

// 根据用户_id查询订单信息
order.get('/user/:_id', require('./action/order/findUserOrder'));

// 发货
order.put('/sendOutGoods', require('./action/order/sendOutGoods'));
// 根据订单id修改订单地址
order.put('/:id', require('./action/order/orderModify'));


module.exports = order;